using System;

/// <summary>
/// This class is to be inherited by all pages that need to disable browser/webserver cache because of the 
/// back button problem.
/// </summary>
namespace PHSRAG.Insight21.Common.Pages
{
    public class NoCachePage : BasePage
    {
        protected override void OnLoad(EventArgs e)
        {
            Response.AddHeader("Pragma", "no-cache");
            Response.CacheControl = "no-cache";
            Response.Expires = 0;
            Response.ExpiresAbsolute = DateTime.Now.Subtract(new TimeSpan(1, 0, 0, 0));

            base.OnLoad(e);
        }
    }
}